<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>点击</button>
    <script>
        // 1.没有arguments 
        // 2.不能作为构造函数  
        // 3.箭头函数没有this绑定，它的this是上层,上下文（context）的this
        var btn = document.querySelector("button");
        btn.onclick = () => {
            console.log(this);
            setTimeout(() => {
                console.log(this);
                var obj = {
                    myname: "张三",
                    fn: () => {
                        // 没有this ，获取上一层的this 
                        // this 穿透 
                        console.log(this); 
                    }
                }
                obj.fn();
            }, 500);
        }
    </script>
</body>

</html>